Repository navigation
feat: base URL option for Hindsight Inference (Python, Node.js, CLI 0.2.0) - #6
Merged
Merged
Conversation
….2.0)
Iris also runs on Hindsight Inference with the same API: the same paths under the base URL
(/files, /extraction, /extraction/{id}) and the same request and response bodies. The organization
comes from the key, so it isn't in the path. Every client can now be pointed at it:
- Python: base_url= on extract_text / extract_text_from_file (and the async versions)
- Node.js: baseUrl in ExtractionOptions
- CLI: --base-url, or base_url in ~/.vectorize-iris/credentials
- All three: the VECTORIZE_IRIS_BASE_URL env var
With a base URL, requests go to it as given and no org ID is needed:
export VECTORIZE_IRIS_BASE_URL="https://inference.hindsight.vectorize.io/v1"
export VECTORIZE_TOKEN="hsk_..."
Without one, nothing changes: https://api.vectorize.io/v1/org/{orgId}, org ID required (the CLI's
hidden --api-url still replaces only the host).
Versions: Python 0.2.0, Node.js 0.2.0, CLI 0.2.0. New tests (Python tests/test_base_url.py, Node
tests/baseUrl.test.ts, CLI unit tests) check the URLs each call goes to and the defaults.
Claude-Session: https://claude.ai/code/session_01XypsfKDtYZSmN3FFv6z5tN
benfrank241
approved these changes
Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Iris also runs on Hindsight Inference with the same API: the same paths under the base URL (
/files,/extraction,/extraction/{id}) and the same request and response bodies. The organization comes from the key, so it isn't in the path. This PR lets every client point at it.base_url=onextract_text,extract_text_from_fileand the async versionsVECTORIZE_IRIS_BASE_URLbaseUrlinExtractionOptionsVECTORIZE_IRIS_BASE_URL--base-url, orbase_urlin~/.vectorize-iris/credentialsVECTORIZE_IRIS_BASE_URLWith a base URL, requests go to it as given, and no org ID is needed:
Without one, nothing changes: requests go to
https://api.vectorize.io/v1/org/{orgId}, and the org ID is still required. The CLI's hidden--api-urlstill replaces only the host.Versions: Python 0.2.0, Node.js 0.2.0, CLI 0.2.0. The change is additive, and the defaults are unchanged.
Tests: new tests check the URL each call goes to, the env var and argument precedence, and the defaults.
tests/test_base_url.py: 9, sync and asynctests/baseUrl.test.ts: 7tscbuild and CLIcargo buildare clean.Not fixed here: the older unit suites (
python-api/tests/test_vectorize_iris.py,test_async_client.py,nodejs-api/tests/index.test.ts) already fail onmain. They patch a module path that no longer exists or callextractTextwith a file path, and some of them reach the real api.vectorize.io. CI only builds, so this has gone unnoticed.Publishing (PyPI, npm, CLI binaries) happens separately via
release.shtags after merge.https://claude.ai/code/session_01XypsfKDtYZSmN3FFv6z5tN